package com.yr.ryjk.user.entity;

import java.util.Date;

import org.springframework.format.annotation.DateTimeFormat;

import com.yr.ryjk.common.Constant;

/**
 * 用户
 * @author Rick
 *
 */
public class User {
    private String id;//运行id

    private String name;//昵称,允许重复,不采用该字段进行登录

    private String password;

    private String phone;//重要标识,不允许修改

    private int gender;//0代表女,1代表男,默认0

    private Date birthday;

    private Date registerTime;

    private int coin;

    private String coinMd5;
    
    @DateTimeFormat(pattern=Constant.DATE_FORMAT)
    private Date lastLoginTime;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id == null ? null : id.trim();
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name == null ? null : name.trim();
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password == null ? null : password.trim();
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone == null ? null : phone.trim();
    }

    public void setGender(int gender) {
		this.gender = gender;
	}
    
    public int getGender() {
		return gender;
	}

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public Date getRegisterTime() {
        return registerTime;
    }

    public void setRegisterTime(Date registerTime) {
        this.registerTime = registerTime;
    }

    public int getCoin() {
        return coin;
    }

    public void setCoin(int coin) {
        this.coin = coin;
    }

    public String getCoinMd5() {
        return coinMd5;
    }

    public void setCoinMd5(String coinMd5) {
        this.coinMd5 = coinMd5 == null ? null : coinMd5.trim();
    }

    public Date getLastLoginTime() {
        return lastLoginTime;
    }

    public void setLastLoginTime(Date lastLoginTime) {
        this.lastLoginTime = lastLoginTime;
    }
}